Skip to content

Add Toroid device support and update WireMetadata for charge toroids - #33

Merged
kabanaty merged 3 commits into
slaclab:mainfrom
kabanaty:charge-toroids
Jul 27, 2026
Merged

Add Toroid device support and update WireMetadata for charge toroids#33
kabanaty merged 3 commits into
slaclab:mainfrom
kabanaty:charge-toroids

Conversation

@kabanaty

Copy link
Copy Markdown
Collaborator

This pull request adds support for Toroid devices to the codebase, enabling their creation, management, and integration with existing device handling infrastructure. The main changes include the implementation of the Toroid class and its supporting classes, updates to the device reader logic, and minor enhancements to related metadata structures.

Toroid device support:

  • Added a new Toroid class in slac_devices/toroid.py, along with supporting classes ToroidPVSet, ToroidControlInformation, and ToroidMetadata. These handle Toroid-specific process variables, control information, and metadata, and provide methods for accessing current and buffered TMIT values.
  • Updated slac_devices/reader.py to import the new Toroid class and include "toroids" in the list of recognized device types and the device constructor map.

Device creation enhancements:

  • Added a new create_toroid function to slac_devices/reader.py for instantiating Toroid devices by area and name, with error handling for invalid or missing data.

Metadata improvements:

  • Extended the WireMetadata class in slac_devices/wire.py to include an optional charge_toroids field, allowing wire devices to reference associated Toroids.

@kabanaty
kabanaty requested review from eloise-nebula and nneveu July 24, 2026 19:40

@eloise-nebula eloise-nebula left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one comment. I'm approving. Thank you!

Comment thread slac_devices/reader.py Outdated
@kabanaty
kabanaty merged commit 2f85559 into slaclab:main Jul 27, 2026
3 checks passed
@kabanaty
kabanaty deleted the charge-toroids branch July 27, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants